//
//  AddShopCarView.m
//  Mahjong
//
//  Created by Chen on 16/9/17.
//  Copyright © 2016年 Elliot. All rights reserved.
//

#import "AddShopCarView.h"
#import "AddShopCarDetailView.h"

@interface AddShopCarView()<disDelegate>

@end

@implementation AddShopCarView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupViews];
    }
    return self;
}

- (void)setupViews{
    self.backgroundColor = [UIColor clearColor];
    
    UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight)];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(remove)];
    backView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.3];
    [backView addGestureRecognizer:tap];
    [self addSubview:backView];
    
    
    AddShopCarDetailView *detailView = [AddShopCarDetailView initWithAddShopCarDetailView];
    detailView.delegate = self;
    detailView.frame = CGRectMake(00, kUIScreenHeight - 530, kUIScreenWidth, 530);
    [self addSubview:detailView];
}
-(void)dis{
    [self removeFromSuperview];
}
- (void)remove{
    [self removeFromSuperview];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
